
from rest_framework.viewsets import ModelViewSet
from rest_framework.generics import ListAPIView
from meiduo_admin.serializers.option_serializers import *
from meiduo_admin.utils.pages import MyPage
from goods.models import GoodsSpecification
from meiduo_admin.serializers.spec_serializers import SpecModelSerializer


class OptSpecSimpleView(ListAPIView):
    queryset = GoodsSpecification.objects.all()
    serializer_class = SpecModelSerializer


class OptModelViewSet(ModelViewSet):
    queryset = SpecificationOption.objects.all()
    serializer_class = OptionModelSerializer

    pagination_class = MyPage